﻿using Architecture.Domain.RBAC;
using Architecture.Repository.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Repository.Impl
{
    public class MenuRepository : BaseRepository<Menu>, IMenuRepository
    {
        public MenuRepository(EFCoreContext context) : base(context)
        {
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public async Task<int> AddAsync(Menu entity)
        {
            return await base.AddAsync(entity);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public async Task<int> UpdateAsync(Menu entity)
        {
            return await base.UpdateAsync(entity);
        }
        /// <summary>
        /// 显示查询
        /// </summary>
        /// <returns></returns>
        public async Task<List<Menu>> GetAllAsync()
        {
            return await base.GetAllAsync();
        }
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<Menu> GetAsync(int id)
        {
            return await base.GetAsync(id);
        }
        public Task<int> DeleteAsync(Menu entity)
        {
            return  base.DeleteAsync(entity);
        }
    }
}
